//
// Created by grind on 2019/6/28.
//

#ifndef A_CPLUSPRIME_SINGLETON_H
#define A_CPLUSPRIME_SINGLETON_H


#include <iostream>

class Singleton {
public:
    static Singleton&& GetInstance();

    void printInfo();

    Singleton(Singleton const &) {
        std::cout << "copy constructor is called!" << std::endl;
    }
    Singleton& operator= (const Singleton &) {
        std::cout << "operate= is called" << std::endl;
    }
private:
    Singleton() {
        std::cout << "Singleton() is called"<< std::endl;
    }

};


#endif //A_CPLUSPRIME_SINGLETON_H
